package cn.itsource.controller;

import cn.itsource.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Value("${server.port}")
    private int port;

    @RequestMapping("/getuser/{id}")
    public User getUser(@PathVariable("id") long id){
        return new User(id, "第二次测试", "端口号"+ port);
    }
}
